USE [MMS]
GO

/****** Object:  Trigger [dbo].[TR_AS_INSERT_EMP_CUS]    Script Date: 12/03/2012 23:08:59 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER [dbo].[TR_AS_INSERT_EMP_CUS] ON [dbo].[MMS_EMP_CUS_CTRL] 
  AFTER INSERT AS
BEGIN

  SET NOCOUNT ON;
  UPDATE [dbo].[MMS_EMP_CUS_CTRL] 
  SET createdate = getdate() 
  WHERE id = (select top 1 id from [dbo].[MMS_EMP_CUS_CTRL] order by id desc)

END
GO

